package truef.seller.domain;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import edu.zut.cs.software.base.domain.BaseTreeEntity;
@Table(name="T_SELLER")
@Entity
@NamedQueries({ @NamedQuery(name = "Seller.getRoot", query = "select g from Seller g where g.parent is null") })
public class Seller extends BaseTreeEntity<Seller> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8901337536395515421L;
	
    String Name;
	
	int PhoneNumber;
	
	String Sex;
	
	
	int PassWord;
	
	@Column(name = "CustomService")
	@OneToMany(mappedBy = "seller", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
	Set<CustomService> CustomServices;
	public String getName() {
		return Name;
	}

	public void setName(String name) {
		Name = name;
	}

	public int getPhoneNumber() {
		return PhoneNumber;
	}

	public void setPhoneNumber(int phoneNumber) {
		PhoneNumber = phoneNumber;
	}

	public String getSex() {
		return Sex;
	}

	public void setSex(String sex) {
		Sex = sex;
	}

	public int getPassWord() {
		return PassWord;
	}

	public void setPassWord(int passWord) {
		PassWord = passWord;
	}

	public boolean setCustomService(CustomService customService) {
		CustomServices.add(customService);
		return true;
	}

}
